/*
 * Copyright (c) 2022, tyustli
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2022-02-08     tyustli      first implementation
 */

#include <stdio.h>
#include <math.h>

int main(int argc, char **argv)
{
    int rows;

    rows = 5;
    for (int i = 1; i <= rows; i++)
    {
        for (int j = 1; j < i; j++)
            printf("* ");
        printf("\r\n");
    }

    rows = 5;
    for (int i = 1; i <= rows; i++)
    {
        for (int j = 1; j < i; j++)
            printf("%d ", j);
        printf("\r\n");
    }

    rows = 5;
    char value = 'A';
    for (int i = 1; i <= rows; i++)
    {
        for (int j = 1; j < i; j++)
            printf("%c ", value++);
        printf("\r\n");
    }

    rows = 5;
    for (int i = rows; i >= 1; i--)
    {
        for (int j = 1; j < i; j++)
            printf("* ");
        printf("\r\n");
    }

    return 0;
}

/******************** end of file **********************/
